Skip to content

feat(api): serve the built UI in development too - #56

Merged
albanm merged 1 commit into
masterfrom
stack-memory
Nov 30, 2026
Merged

albanm merged 1 commit into
masterfrom
stack-memory

Conversation

@albanm

@albanm albanm commented Nov 30, 2026

Copy link
Copy Markdown
Member

The API now serves ui/dist whatever the environment, like the other data-fair services: the NODE_ENV !== 'development' gate around createSpaMiddleware is gone.

Why: a development environment can then test the built UI, served by the API with its production CSP, instead of always running the Vite dev server. In development the reverse proxy chooses: the Vite dev server for hot reload, or the API for the built UI. dev/setup.sh already builds ui/dist.

Heads-up: in development the API now reads ui/dist/index.html at startup and fails without it. dev-setup builds it, so this only bites an environment that starts the API without running dev-setup first.

🤖 Generated with Claude Code

Like the other data-fair services, the API serves ui/dist whatever the
environment. dev/setup.sh already builds it. In development the reverse
proxy still chooses: the Vite dev server for hot reload, or the API to
test the built UI with its production CSP.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@albanm
albanm merged commit 2d1d9a3 into master Nov 30, 2026
5 checks passed
@albanm
albanm deleted the stack-memory branch November 30, 2026 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant